<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<?php
// Cek User Login Session
if(!$this->session->userdata('userid'))
	redirect('welcome/logout');

if(isset($value_tingkat) && isset($value_kelas)){
	if($value_tingkat !='' && $value_kelas == ''){
		echo "<script type='text/javascript'> alert('Kelas harus dipilih terlebih dahulu')</script>";
	}
}

if(isset($value_tingkat) && isset($value_kelas) && isset($value_semester)){
	if($value_tingkat !='' && $value_kelas != '' && $value_semester == ''){
		echo "<script type='text/javascript'> alert('Semester harus dipilih terlebih dahulu')</script>";
	}
}

?>			
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

	<title>ISE (International Study Equipment) | Sistem Informasi Manajemen Lembaga Pendidikan</title>

	<?if($this->session->userdata('warna_tema') == 'biru'){?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery_biru.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main_biru.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form_biru.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo_biru.png" />
	<?}else if($this->session->userdata('warna_tema') == 'hijau'){?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery_hijau.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main_hijau.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form_hijau.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo_hijau.png" />
	<?}else if($this->session->userdata('warna_tema') == 'kuning'){?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery_kuning.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main_kuning.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form_kuning.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo_kuning.png" />
	<?}else if($this->session->userdata('warna_tema') == 'merah'){?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo.png" />
	<?}else if($this->session->userdata('warna_tema') == 'hitam'){?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery_hitam.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main_hitam.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form_hitam.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo.png" />
	<?}else{?>
	<!-- Link CSS -->
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/flexigrid.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/jquery.css" media="screen, tv, projection" title="Default" />
	<link href="<?= base_url() ?>css/lightbox.css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/main.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/gridheader.css" media="screen, tv, projection" title="Default" />
	<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
	<link rel="icon" type="image/x-icon" href="<?= base_url() ?>images/logo.png" />
	<?}?>
	
	
	<!-- JAVASCRIPT -->
	<script>
	
		$(document).ready(function() {
			$("#myDialog").dialog({
				autoOpen: false,
				resizable: false,
				position: 'center',
				stack: true,
				height: 'auto',
				width: 'auto',
				modal: true
			 });

			$("#showDialog").button().click(function (event) {
				$("#myDialog").dialog('open');
			});
		});

	</script>
	<script type="text/javascript" src="<?= base_url() ?>js/jquery.js"></script>
	<script type="text/javascript">
		window.addEvent('domready', function(){	
			var accordion2 = new Accordion($$('.toggler'),$$('.element'), {
				show: 5,
				fixedheight: false,
				alwaysHide: true
			});
		});
	</script>
	<script type="text/javascript">
	<!--//---------------------------------+
	//  Developed by Roshan Bhattarai 
	//  Visit http://roshanbh.com.np for this script and more.
	//  This notice MUST stay intact for legal use
	// --------------------------------->
	$(document).ready(function()
	{
		//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
		$("#firstpane p.menu_head").click(function()
		{
			$(this).css({backgroundImage:"url(<?= base_url() ?>images/main/bl_head1.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
			$(this).siblings().css({backgroundImage:"url(<?= base_url() ?>images/main/bl_head0.png)"});
		});
		//slides the element with class "menu_body" when mouse is over the paragraph
		$("#secondpane p.menu_head").mouseover(function()
		{
			 $(this).css({backgroundImage:"url(<?= base_url() ?>images/main/down.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
			 $(this).siblings().css({backgroundImage:"url(<?= base_url() ?>images/main/left.png)"});
		});
		
		//$('a.lightbox').lightBox();
		get_logo();
		
	});
	</script>
	<script> 
		var outerLayout, middleLayout, innerLayout; 
		$(document).ready(function () { 
			outerLayout = $('body').layout({ 
				center__paneSelector:	".outer-center" 
			,	west__paneSelector:		".outer-west" 
			,	east__paneSelector:		".outer-east" 
			,	west__size:				125 
			,	east__size:				173 
			,	spacing_open:			8 // ALL panes
			,	spacing_closed:			8 // ALL panes
			,	north__spacing_open:	0
			,	south__spacing_open:	0
			,	center__onresize:		"middleLayout.resizeAll" 
			}); 
			middleLayout = $('div.outer-center').layout({ 
				center__paneSelector:	".middle-center" 
			,	west__paneSelector:		".middle-west" 
			,	east__paneSelector:		".middle-east" 
			,	west__size:				100 
			,	east__size:				100 
			,	spacing_open:			8  // ALL panes
			,	spacing_closed:			12 // ALL panes
			,	center__onresize:		"innerLayout.resizeAll" 
			}); 
			innerLayout = $('div.middle-center').layout({ 
				center__paneSelector:	".inner-center" 
			,	west__paneSelector:		".inner-west" 
			,	east__paneSelector:		".inner-east" 
			,	west__size:				75 
			,	east__size:				75 
			,	spacing_open:			8  // ALL panes
			,	spacing_closed:			8  // ALL panes
			,	west__spacing_closed:	12
			,	east__spacing_closed:	12
			}); 
		}); 
	</script>
	
	<script>
	function get_logo(){
		// alert('masuk');
		var prp = '';
		$.ajax({
			url: "<?php  echo base_url(); ?>index.php/konfigurasi/get_logo/",
			global: false,
			type: "POST",
			async: false,
			dataType: "html",
			data: "logo="+ prp, //the name of the $_POST variable and its value
			success: function (response) {
				var val = response.split('#');
				$("#logo").append(val[0]);
				$("#header1").append(val[1]);
			}
		});
		return false;
	}
	
    function change_tingkat(){
		var prp = $("#tingkat").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/get_daftar_kelas/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "tingkat_id="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
			 // var dynamic_options2 = $("*").index( $('.dynamic7')[0] );
                // if ( dynamic_options2 != (-1)) $(".dynamic7").remove();
                $("#kelas").remove();
				$("#kelas2").append(response);
                // $(".third").attr({selected: ' selected'});
            }
        });
        return false;
    }
	
	function change_kelas_tujuan(){
		var prp = $("#kelas_tujuan").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_kelas_tujuan/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "tujuan_kelas="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
        return false;
	}
	
	function change_jenis_kelulusan(){
		var prp = $("#jns_lulus").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_jenis_kelulusan/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "jns_lulus="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
        return false;
	}
	
	function change_keterangan_kelulusan(){
		var prp = $("#ket_lulus").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_keterangan_kelulusan/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "ket_lulus="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
        return false;
	}
	
	function change_jenis_kenaikan(){
		var prp = $("#jns_naik").val();
		var prp2 = $("#tingkat").val();
		var prp3 = $("#tahun_ajaran_naik").val();
		if(prp3 != ''){
			$.ajax({
				url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_jenis_kenaikan/",
				global: false,
				type: "POST",
				async: false,
				dataType: "html",
				data: "jns_naik="+ prp +"&tingkat_id="+prp2 +"&tahun_id="+prp3, //the name of the $_POST variable and its value
				success: function (response) {
					$("#kelas_tujuan_naik").remove();
					$("#kelas_tujuan_naik2").append(response);
				}
			});
		}
		else {
			alert('Tahun Ajaran harus dipilih terlebih dahulu !!!')
			document.form_filter.jns_naik[0].selected = "1";
		}
        return false;
	}
	
	function change_tahun_ajaran_naik(){
		var prp = $("#tahun_ajaran_naik").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_tahunajaran_naik/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "tahun_ajaran_naik="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
		if(prp == ''){
			document.form_filter.jns_naik[0].selected = "1";
			document.form_filter.kelas_tujuan_naik[0].selected = "1";
			
		}
        return false;
	}
	
	function change_kelas_tujuan_naik(){
		var prp = $("#kelas_tujuan_naik").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_kelas_tujuan_naik/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "kelas_tujuan_naik="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
        return false;
	}
	
	function change_keterangan_kenaikan(){
		var prp = $("#ket_naik").val();
		$.ajax({
            url: "<?php  echo base_url(); ?>index.php/ms_siswa/set_session_keterangan_kenaikan/",
            global: false,
            type: "POST",
            async: false,
            dataType: "html",
            data: "ket_naik="+ prp, //the name of the $_POST variable and its value
            success: function (response) {
				// alert(response);
			}
        });
        return false;
	}
	
</script>

	<script type="text/javascript" src="<?php echo base_url() ?>js/jquery.js"></script>
	<script src="<?= base_url() ?>js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<?= base_url() ?>js/jquery.ui.all.js"></script>
	<script type="text/javascript" src="<?= base_url() ?>js/jquery.layout.js"></script>	
	<script type="text/javascript" src="<?= base_url() ?>js/flexigrid.js"></script>	
	
	<?if (isset($added_js)){echo $added_js;}?> <!-- attach js flexigrid (jika ada) -->
	
</head>
<body>
<div class="ui-layout-north">
	<div id="toppanel">
		<?/*<a href="<?= base_url();?>">
		<?if($this->session->userdata('warna_tema') == 'merah'){?>
		<div id="logo"><img src="<?= base_url() ?>images/logo.png" width="36" height="36" border="0"></img></div>
		<?}else if($this->session->userdata('warna_tema') == 'biru'){?>
		<div id="logo"><img src="<?= base_url() ?>images/logo_biru.png" width="36" height="36" border="0"></img></div>
		<?}else if($this->session->userdata('warna_tema') == 'hijau'){?>
		<div id="logo"><img src="<?= base_url() ?>images/logo_hijau.png" width="36" height="36" border="0"></img></div>
		<?}else if($this->session->userdata('warna_tema') == 'kuning'){?>
		<div id="logo"><img src="<?= base_url() ?>images/logo_kuning.png" width="36" height="36" border="0"></img></div>
		<?}else if($this->session->userdata('warna_tema') == 'hitam'){?>
		<div id="logo"><img src="<?= base_url() ?>images/logo.png" width="36" height="36" border="0"></img></div>
		<?}else{?>
		<div id="logo"><img src="<?= base_url() ?>images/main/logo.png" width="36" height="36" border="0"></img></div>
		<?}?>
		*/?>
		<a href="<?= base_url();?>"><div id="logo"></div>
		<div id="header1"></div>
		<?/*<div id="header1">
			ISE (International Study Equipment) </br> Sistem Informasi Manajemen Lembaga Pendidikans
		</div>*/?>
		</a>
		
		<div id="headerinstansi">
			<img src="<?= base_url() ?>images/main/logoPU.jpg" width="36" height="36" border="0"></img>
		</div>
		
		<div id="myDialog" style="display:none" title="">
			This is a dialog
		</div>
		<div id="header2" title="Logout">
			<a href="<?php echo site_url('welcome/logout');?>"><strong>Logout</strong></a>
		</div>
		
		<div id="header2">
			<a><strong>User Login : <?php echo $this->session->userdata('username'); ?></strong></a>
		</div>
	</div>
</div> 
<div class="outer-center"><div id="main">
<?php if(isset($url_filter)) echo form_open($url_filter,'class="wufoo" name="form_filter"'); ?>
<table>
	<tr>
	<td width="<? if(isset($width)) echo $width ?>">
	<table><tr>
		<?if(isset($thnajaran)){?>
		<td width="85">Tahun Ajaran : </td>
		<td width="120">
		<?			
			$options_ta[''] = "-- Pilih Tahun Ajaran --";
			foreach($thnajaran->result() as $rows){
				$options_ta[$rows->ID_TA] = $rows->TAHUN_AJARAN; 
			}
			echo form_dropdown('tahunajaran',$options_ta,$value_tahunajaran,'id="tahunajaran" class="field select"');	
		?>
		</td>
		<?}if(isset($tingkat)){?>
		<td width="45">Tingkat : </td>
		<td width="120">
		<?			
			$options_tingkat[''] = "-- Pilih Tingkat --";
			foreach($tingkat->result() as $rows){
				$options_tingkat[$rows->ID_TINGKAT] = $rows->TINGKAT; 
			}
			echo form_dropdown('tingkat',$options_tingkat,$value_tingkat,'id="tingkat" class="field select" onChange="change_tingkat()" ');	
		?>
		</td>
		<?}if(isset($kelas)){?>
		<td width="35">Kelas : </td>
		<td width="110" id="kelas2">
		<?			
			$options_kelas[''] = "-- Pilih Kelas --";
			foreach($kelas->result() as $rows){
				$options_kelas[$rows->ID_KELAS] = $rows->KELAS; 
			}
			echo form_dropdown('kelas',$options_kelas,$value_kelas,'id="kelas" class="field select"');	
		?>
		</td>
		<?}if(isset($semester)){?>
		<td width="56">Semester : </td>
		<td width="50" >
		<?			
			// $options_semester[''] = "-- Pilih Semester --";
			foreach($semester->result() as $rows){
				$options_semester[$rows->ID_SMT] = $rows->SEMESTER; 
			}
			echo form_dropdown('semester',$options_semester,$value_semester,'class="field select"');	
		?>
		</td>
		<?}if(isset($filter_rak)){?>
		<td width="56">Rak : </td>
		<td width="50" >
		<?			
			$options_rak[''] = "-- Pilih Rak --";
			foreach($filter_rak->result() as $rows){
				$options_rak[$rows->ID_RAK] = $rows->NAMA_RAK; 
			}
			echo form_dropdown('id_rak',$options_rak,$value_rak,'class="field select"');	
		?>
		</td>
		<?}if(isset($filter_nisn)){?>
			<td width="76">Jenis Anggota: <br><br>NIS Siswa : </td>
			<td nowrap width="250" >
				<input name="jenis_anggota" id="jenis_anggota1" type="radio" value="1" <?php if($this->session->userdata('sess_jenisanggota')==1) echo 'checked';?> />Siswa&nbsp;&nbsp;<input name="jenis_anggota" id="jenis_anggota2" type="radio" value="2" <?php if($this->session->userdata('sess_jenisanggota')==2) echo 'checked';?>/>Pegawai/Guru<br><br>
				<input style="background:#e0e2e3" class="field text" type="text" maxlength="20" size="20" name="nisn"  id="nisn" readonly value="<?php echo $this->session->userdata('sess_nisn');?>"/>	
				<input style="background:#e0e2e3" class="field text" type="text" maxlength="50" size="50" name="nama_anggota"  id="nama_anggota" readonly value="<?php echo $this->session->userdata('sess_namaanggota');?>"/>	
				<a href="javascript:goPopup()" ><img src="<?php echo base_url().'images/magnifier.png'?>"/></a>
				<input type="hidden" name="h_nisn" id="h_nisn" value="<?php echo $this->session->userdata('sess_nisn');?>"/>	
				<input type="hidden" name="h_jenisanggota" id="h_jenisanggota" value="<?php echo $this->session->userdata('sess_jenisanggota');?>"/>	
			</td>
		<?}if(isset($pengajar)){?>
			<td width="76">Pengajar : </td>
			<td nowrap width="250" >
				<input style="background:#e0e2e3" class="field text" type="text" maxlength="20" size="20" name="nisn"  id="nisn" readonly value="<?php echo $this->session->userdata('sess_nilai_nipguru');?>"/>	
				<input style="background:#e0e2e3" class="field text" type="text" maxlength="50" size="50" name="nama_anggota"  id="nama_anggota" readonly value="<?php echo $this->session->userdata('sess_nilai_namaanggota');?>"/>	
				<a href="javascript:goPopup_pengajar()" ><img src="<?php echo base_url().'images/magnifier.png'?>"/></a>
				<input type="hidden" name="h_nisn" id="h_nisn" value="<?php echo $this->session->userdata('sess_nilai_nipguru');?>"/>	
				<input type="hidden" name="h_jenisanggota" id="h_jenisanggota" value="<?php echo $this->session->userdata('sess_jenisanggota');?>"/>	
			</td>
		<!--<td>Pengajar: </td>
		<td>
			<div>
			    <? 
			    //list nipwali
					// $options_nip['0'] = "-- Pilih Guru --";
					// foreach($pengajar->result() as $role){
						// $gelard = ''; $gelarb = '';
						// if($role->GELAR_DEPAN != '')
							// $gelard = $role->GELAR_DEPAN.'. ';
						// if($role->GELAR_BELAKANG != '')
							// $gelarb = ', '.$role->GELAR_BELAKANG;
						// $nama_gelar = $gelard.$role->NAMA_LENGKAP .$gelarb;
						// $options_nip[$role->NIP] = $nama_gelar;
					// }
						// echo form_dropdown('nip_guru',$options_nip,$nip_guru,'class="chzn-select"');	
			    ?>
		    </div>
		</td>-->
		<?}?>
		<?php if(isset($thnajaran) or isset($tingkat) or isset($kelas) or isset($semester) or isset($filter_rak) or isset($filter_nisn)){?>
		<td>
			 <input id="saveForm" class="btTxt" type="submit" value="Filter" />
		</td>
		<?}?>
	</tr></table>
	</td>
	<td>
	<table><tr>
		<?if(isset($kelas_tujuan)){?>
		<td width="80"> Kelas Tujuan :
		</td>
		<td>
		<?			
			$options_kelas_tujuan[''] = "-- Pilih Kelas Tujuan--";
			foreach($kelas_tujuan->result() as $rows){
				$options_kelas_tujuan[$rows->ID_KELAS] = $rows->KELAS; 
			}
			echo form_dropdown('kelas_tujuan',$options_kelas_tujuan,$this->session->userdata('sess_kelas_tujuan'),'id="kelas_tujuan" class="field select" onChange="change_kelas_tujuan()"');	
		?>
		</td>
		<?}?>
		<?if(isset($jns_lulus)){?>
		<td width="85"> Jenis Kelulusan :
		</td>
		<td width="150">
		<?
			$options_kelulusan[''] = "-- Pilih Kelulusan --";
			$options_kelulusan['1'] = " Lulus ";
			$options_kelulusan['2'] = " Tidak Lulus ";
			echo form_dropdown('jns_lulus',$options_kelulusan,$this->session->userdata('sess_jenis_lulus'),'id="jns_lulus" class="field select" onChange="change_jenis_kelulusan()"');
		?>
		</td>
		<?}?>
		<?if(isset($ket_lulus)){?>
		
		<td width="95"> Keterangan Lulus :
		</td>
		<td>
			<input class="field text" type="text" maxlength="50" size="50" name="ket_lulus" id="ket_lulus" onBlur="change_keterangan_kelulusan()" value="<?=$this->session->userdata('sess_keterangan_lulus');?>"/>	
		</td>
		<?}?>
		<?if(isset($jns_naik)){?>
		<td >
		<table><tr>	
		<td width="80"> Tahun Ajaran :
		</td>
		<td>
		<?			
			$options_tahun_ajaran_naik[''] = "-- Pilih Tahun Ajaran--";
			foreach($tahun_ajaran_naik->result() as $rows){
				$options_tahun_ajaran_naik[$rows->ID_TA] = $rows->TAHUN_AJARAN; 
			}
			echo form_dropdown('tahun_ajaran_naik',$options_tahun_ajaran_naik,$this->session->userdata('sess_tahun_ajaran_naik'),'id="tahun_ajaran_naik" class="field select" onChange="change_tahun_ajaran_naik()"');	
		?>
		</td>
		<?}?>
		
		<?if(isset($kelas_tujuan_naik)){?>
		<td width="80"> Kelas Tujuan :
		</td>
		<td id="kelas_tujuan_naik2">
		<?			
			$options_kelas_tujuan_naik[''] = "-- Pilih Kelas Tujuan--";
			if($kelas_tujuan_naik != 'default'){
				foreach($kelas_tujuan_naik->result() as $rows){
					$options_kelas_tujuan_naik[$rows->ID_KELAS] = $rows->KELAS; 
				}
			}
			echo form_dropdown('kelas_tujuan_naik',$options_kelas_tujuan_naik,$this->session->userdata('sess_kelas_tujuan_naik'),'id="kelas_tujuan_naik" class="field select" onChange="change_kelas_tujuan_naik()"');	
		?>
		</td>
		</tr>
		<?}?>
		
		<?if(isset($tahun_ajaran_naik)){?>
		<tr>
		<td width="85"> Jenis Kenaikan :
		</td>
		<td width="150">
		<?
			$options_kenaikan[''] = "-- Pilih Kenaikan --";
			$options_kenaikan['1'] = " Naik ";
			$options_kenaikan['2'] = " Tidak Naik ";
			echo form_dropdown('jns_naik',$options_kenaikan,$this->session->userdata('sess_jenis_naik'),'id="jns_naik" class="field select" onChange="change_jenis_kenaikan()"');
		?>
		</td>
		<?}?>
		<?if(isset($ket_naik)){?>
		
		<td width="95"> Keterangan Naik :
		</td>
		<td>
			<input class="field text" type="text" maxlength="50" size="50" name="ket_naik" id="ket_naik" onBlur="change_keterangan_kenaikan()" value="<?=$this->session->userdata('sess_keterangan_naik');?>"/>	
		</td>
		</tr>
		<?}?>
		
		</table></td>
	</tr></table>
	</td>
	</tr>
</table>

<?= form_close(); ?>

<?if(!isset($header_info)) {echo '</br>';}?>

<?if(isset($content)) {echo $content;}?></div></div> 


	<div class="outer-east"><? $this->load->view("menu_kanan");?></div> 

<!--div class="ui-layout-south">
	<div id="footerpanel">
		<div id="footer">
		<strong> 2011 - 2012, Research & Development Team.</strong>
	</div>
	</div>
</div--> 

</body>
</html>

<script type="text/javascript">
  $(".chzn-select").chosen();
  $(".chzn-select-deselect").chosen({allow_single_deselect:true});
  
function goPopup(){
	// var x = $('input[@name="jenis_anggota":checked').val();
	var radioButtons = document.getElementsByName('jenis_anggota');
	for (var x = 0; x < radioButtons.length; x++) {
		if (radioButtons[x].checked) {
			var id_jenis = radioButtons[x].value;
		}
	}
	if(id_jenis == '1'){ //siswa
		win = window.open("<?php echo base_url().'index.php/perpus/list_pinjam/list_siswa'?>","popup_siswa","width=700,height=550,scrollbars=0");
		win.focus();
	}else if(id_jenis == '2'){ //guru/pegawai
		win = window.open("<?php echo base_url().'index.php/perpus/list_pinjam/list_pegawai_guru'?>","popup_siswa","width=700,height=550,scrollbars=0");
		win.focus();
	}else if(id_jenis == '3'){
		alert('Anggota luar?sapa loe?!');
	}else{
		alert('Pilih dahulu jenis anggota!');
	}
}
function goPopup_pengajar(){
	win = window.open("<?php echo base_url().'index.php/perpus/list_pinjam/list_pegawai_guru/1'?>","popup_siswa","width=700,height=550,scrollbars=0");
	win.focus();
}
</script>